/**
 * 
 */
package fr.toto.comparators;

import java.util.Comparator;

import com.kokotchy.betaSeriesAPI.model.Episode;

/**
 * @author tshepo
 *
 */
public class EpisodeComparator implements Comparator<Episode> {
	
	@Override
	public int compare(Episode e1, Episode e2) {
		int ret = e1.getShowUrl().compareTo(e2.getShowUrl());
        if (ret != 0) return ret;
        ret = e1.getSeason() - e2.getSeason();
        if (ret != 0) return ret;
        return e1.getEpisode() - e2.getEpisode();
	}

}
